{% extends 'preheat/base.html' %}

{% block title %}确认删除自动任务 - CDN预热平台{% endblock %}

{% block content %}
<div class="container mt-4">
    <div class="card">
        <div class="card-header bg-danger text-white">
            <h3>确认删除自动任务</h3>
        </div>
        <div class="card-body">
            <p class="mb-4">您确定要删除以下自动任务吗？此操作不可撤销。</p>
            
            <div class="bg-light p-4 rounded mb-4">
                <h4>{{ task.name }}</h4>
                <p class="text-muted mb-1">任务类型：{{ task.get_task_type_display }}</p>
                <p class="text-muted mb-1">执行间隔：{{ task.interval_value }} {{ task.get_interval_type_display }}</p>
                <p class="text-muted mb-1">状态：{% if task.is_active %}启用{% else %}禁用{% endif %}</p>
                {% if task.description %}
                <p class="mt-2">{{ task.description }}</p>
                {% endif %}
            </div>
            
            <form method="post">
                {% csrf_token %}
                <div class="btn-group">
                    <button type="submit" class="btn btn-danger">确认删除</button>
                    <a href="{% url 'preheat:auto_task_list' %}" class="btn btn-secondary">取消</a>
                </div>
            </form>
        </div>
    </div>
</div>

<style>
    .bg-light {
        background-color: #f8f9fa !important;
    }
</style>
{% endblock %}